package vue;

import java.awt.BorderLayout;
import java.awt.EventQueue;

import javax.swing.JFrame;
import javax.swing.JPanel;
import javax.swing.border.EmptyBorder;
import javax.swing.JMenuBar;
import javax.swing.JButton;
import java.awt.event.ActionListener;
import java.awt.event.ActionEvent;
import javax.swing.JTextField;
import javax.swing.JLabel;
import javax.swing.border.LineBorder;
import java.awt.Color;
import javax.swing.JTable;
import javax.swing.table.DefaultTableModel;
import javax.swing.JScrollPane;
import java.awt.FlowLayout;
import java.awt.Font;
import javax.swing.JTextArea;
import javax.swing.border.SoftBevelBorder;
import javax.swing.border.BevelBorder;

public class ModifierLieu extends JFrame {

	private JPanel contentPane;
	private JTextField textField;
	private JTextField textField_1;
	private JTable table;
	private JTextField textField_2;
	private JTextField textField_3;
	private JTextField textField_4;

	/**
	 * Launch the application.
	 */
	/*public static void main(String[] args) {
		EventQueue.invokeLater(new Runnable() {
			public void run() {
				try {
					ModifierLieu frame = new ModifierLieu();
					frame.setVisible(true);
				} catch (Exception e) {
					e.printStackTrace();
				}
			}
		});
	}*/
	public void close()
	{
		this.dispose();
	}
	public void refreshPage()
	{
		this.repaint();
	}
	/**
	 * Create the frame.
	 */
	public ModifierLieu() {
		setTitle("Modifier Lieu");
		setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
		setBounds(100, 100, 1039, 806);
		contentPane = new JPanel();
		contentPane.setBorder(new EmptyBorder(5, 5, 5, 5));
		setContentPane(contentPane);
		contentPane.setLayout(null);
		
		JPanel panel = new JPanel();
		panel.setBounds(0, 0, 230, 31);
		contentPane.add(panel);
		panel.setLayout(new BorderLayout(0, 0));
		
		JMenuBar menuBar = new JMenuBar();
		panel.add(menuBar, BorderLayout.NORTH);
		
		JButton btnNewButton = new JButton("Accueil");
		btnNewButton.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent arg0) {
				Accueil accueilVue = new Accueil();
				accueilVue.setVisible(true);
				close();
			}
		});
		menuBar.add(btnNewButton);
		
		JButton btnNewButton_1 = new JButton("Consulter");
		btnNewButton_1.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent arg0) {
				Consulter consulterVue = new Consulter();
				consulterVue.setVisible(true);
				close();
			}
		});
		menuBar.add(btnNewButton_1);
		
		JButton btnNewButton_2 = new JButton("Editer");
		btnNewButton_2.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent e) {
				Editer editerVue = new Editer();
				editerVue.setVisible(true);
				close();
			}
		});
		menuBar.add(btnNewButton_2);
		
		JPanel panel_2 = new JPanel();
		panel_2.setBounds(24, 64, 506, 682);
		contentPane.add(panel_2);
		panel_2.setLayout(null);
		
		JPanel panel_3 = new JPanel();
		panel_3.setBounds(74, 29, 206, 41);
		panel_2.add(panel_3);
		panel_3.setLayout(null);
		
		JLabel lblNewLabel = new JLabel("Libelle : ");
		lblNewLabel.setBounds(10, 11, 56, 14);
		panel_3.add(lblNewLabel);
		
		textField_1 = new JTextField();
		textField_1.setBounds(60, 8, 110, 20);
		panel_3.add(textField_1);
		textField_1.setColumns(10);
		
		JPanel panel_4 = new JPanel();
		panel_4.setBounds(71, 94, 410, 272);
		panel_2.add(panel_4);
		panel_4.setLayout(null);
		
		JLabel lblCarte = new JLabel("Carte : ");
		lblCarte.setBounds(10, 11, 46, 14);
		panel_4.add(lblCarte);
		
		JPanel panel_5 = new JPanel();
		panel_5.setBorder(new LineBorder(new Color(0, 0, 0)));
		panel_5.setBounds(20, 36, 380, 225);
		panel_4.add(panel_5);
		
		textField = new JTextField();
		textField.setEditable(false);
		textField.setBounds(90, 376, 232, 20);
		panel_2.add(textField);
		textField.setColumns(10);
		
		JButton btnNewButton_3 = new JButton("Browse Image");
		btnNewButton_3.setBounds(343, 375, 131, 23);
		panel_2.add(btnNewButton_3);
		
		JLabel lblNewLabel_1 = new JLabel("Point d'inter\u00EAt : ");
		lblNewLabel_1.setBounds(62, 441, 124, 14);
		panel_2.add(lblNewLabel_1);
		
		JPanel panel_1 = new JPanel();
		panel_1.setBounds(42, 466, 439, 205);
		panel_2.add(panel_1);
		panel_1.setLayout(null);
		
		JScrollPane scrollPane = new JScrollPane();
		scrollPane.setBounds(21, 11, 408, 167);
		panel_1.add(scrollPane);
		
		table = new JTable();
		scrollPane.setViewportView(table);
		table.setModel(new DefaultTableModel(
			new Object[][] {
			},
			new String[] {
				"Point d'inter\u00EAt", "Supprimer"
			}
		) {
			boolean[] columnEditables = new boolean[] {
				false, false
			};
			public boolean isCellEditable(int row, int column) {
				return columnEditables[column];
			}
		});
		
		JButton btnAjouter = new JButton("Ajouter");
		btnAjouter.setBounds(381, 437, 89, 23);
		panel_2.add(btnAjouter);
		
		JButton btnTerminer = new JButton("Terminer");
		btnTerminer.setBounds(542, 745, 89, 23);
		contentPane.add(btnTerminer);
		
		JPanel panel_6 = new JPanel();
		panel_6.setBorder(new SoftBevelBorder(BevelBorder.RAISED, null, null, null, null));
		panel_6.setBounds(656, 81, 357, 652);
		contentPane.add(panel_6);
		panel_6.setLayout(null);
		
		JLabel lblCoordonnes = new JLabel("Coordonn\u00E9es : ");
		lblCoordonnes.setBounds(21, 51, 100, 20);
		panel_6.add(lblCoordonnes);
		
		textField_2 = new JTextField();
		textField_2.setEditable(false);
		textField_2.setBounds(48, 82, 86, 20);
		panel_6.add(textField_2);
		textField_2.setColumns(10);
		
		textField_3 = new JTextField();
		textField_3.setEditable(false);
		textField_3.setBounds(209, 82, 86, 20);
		panel_6.add(textField_3);
		textField_3.setColumns(10);
		
		JLabel lblNewLabel_2 = new JLabel("X : ");
		lblNewLabel_2.setBounds(21, 85, 46, 14);
		panel_6.add(lblNewLabel_2);
		
		JLabel lblNewLabel_3 = new JLabel("Y : ");
		lblNewLabel_3.setBounds(174, 85, 46, 14);
		panel_6.add(lblNewLabel_3);
		
		JButton btnSlectionnerCoordonnes = new JButton("S\u00E9lectionner Coordonn\u00E9es");
		btnSlectionnerCoordonnes.setBounds(136, 11, 188, 23);
		panel_6.add(btnSlectionnerCoordonnes);
		
		JTextArea textArea = new JTextArea();
		textArea.setBounds(21, 254, 326, 134);
		panel_6.add(textArea);
		
		JLabel lblLibelle = new JLabel("Libelle : ");
		lblLibelle.setBounds(21, 151, 46, 14);
		panel_6.add(lblLibelle);
		
		textField_4 = new JTextField();
		textField_4.setBounds(21, 173, 144, 20);
		panel_6.add(textField_4);
		textField_4.setColumns(10);
		
		JLabel lblDescriptif = new JLabel("Descriptif : ");
		lblDescriptif.setBounds(21, 229, 125, 14);
		panel_6.add(lblDescriptif);
		
		JLabel lblImage = new JLabel("Image : ");
		lblImage.setBounds(21, 434, 46, 14);
		panel_6.add(lblImage);
		
		JPanel panel_7 = new JPanel();
		panel_7.setBorder(new LineBorder(new Color(0, 0, 0)));
		panel_7.setBounds(21, 459, 326, 147);
		panel_6.add(panel_7);
		
		JButton btnBrowse = new JButton("Browse");
		btnBrowse.setBounds(258, 430, 89, 23);
		panel_6.add(btnBrowse);
		
		JButton btnValider = new JButton("Valider");
		btnValider.setBounds(258, 618, 89, 23);
		panel_6.add(btnValider);
		
		JLabel lblModifierLieu = new JLabel("Modifier Lieu");
		lblModifierLieu.setFont(new Font("Tahoma", Font.PLAIN, 18));
		lblModifierLieu.setBounds(483, 33, 148, 20);
		contentPane.add(lblModifierLieu);
	}

}
